package edu.gatech.mobile.scene.model;

import edu.gatech.mobile.scene.AppConstants.RELATIVE_TO_HORIZON;

/**
 * Object for storing each image patch.
 * @author Jing
 *
 */
public class MaskInfo {
		
	private String origImageName;
	private String maskName;
	private LabelInfo labelInfo;
	private ColorHistogram colorHistogram;
	private int pixelLocX;
	private int pixelLocY;
	private RELATIVE_TO_HORIZON horizonPosition;
	private Long id;
	private Long time;
	

	public Long getTime() {
		return time;
	}

	public void setTime(Long time) {
		this.time = time;
	}

	public ColorHistogram getHistograms() {
		return colorHistogram;
	}

	public void setHistograms(ColorHistogram histogram) {
		this.colorHistogram = histogram;
	}

	public RELATIVE_TO_HORIZON getHorizonPosition() {
		return horizonPosition;
	}
	
	public void setHorizonPosition(RELATIVE_TO_HORIZON horizonPosition) {
		this.horizonPosition = horizonPosition;
	}
	
	public String getOrigImageName() {
		return origImageName;
	}
	public void setOrigImageName(String origImageName) {
		this.origImageName = origImageName;
	}
	public String getMaskName() {
		return maskName;
	}
	public void setMaskName(String maskName) {
		this.maskName = maskName;
	}
	public LabelInfo getLabelInfo() {
		return labelInfo;
	}
	public void setLabelInfo(LabelInfo labelInfo) {
		this.labelInfo = labelInfo;
	}
		
	public Long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public int getPixelLocX() {
		return pixelLocX;
	}
	public int getPixelLocY() {
		return pixelLocY;
	}
	public void setPixelLocX(int x) {
		this.pixelLocX = x;
	}
	public void setPixelLocY(int y) {
		this.pixelLocY = y;
	}
	
	
	public String toString(){
		return this.maskName + "  Pixel Loc: " + pixelLocX+ ", "+pixelLocY;
	}


//	public void normalizeColorHistogram() {
//		for(int i=0; i<this.histograms.size(); i++){
//			Mat hist = this.histograms.get(i);
//			Scalar sumScalar = Core.sumElems(hist);
//			double sum = sumScalar.val[0];
//			Mat normalizer = HistogramCompareUtil.getNormalizer(
//					hist.height(), hist.width(), sum, hist.type());
//			Mat normalizedHist = new Mat(hist.height(), hist.width(),
//					hist.type());
//			Core.divide(hist, normalizer, normalizedHist);
//			this.histograms.set(i, normalizedHist);
//			hist.release();
//		} 
//		
//	}
	
}
